package cn.csc.module.shoppingCard.api.card.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;

/**
* 购物卡 DTO
*/
@Data
public class CardRespDTO {

    /**
     * 主键id
     */
    @ApiModelProperty(value = "id", required = true)
    private BigInteger id;
    /**
     * 项目ID
     */
    @ApiModelProperty(value = "项目ID")
    private BigInteger projectId;

    @ApiModelProperty(value = "绑定的用户ID")
    private Long userId;

    @ApiModelProperty(value = "用户手机号")
    private String userPhone;

    /**
     * 面值
     */
    @ApiModelProperty(value = "面值", required = true)
    private BigDecimal faceValue;

    @ApiModelProperty(value = "当前余额", required = true)
    @NotNull(message = "当前余额不能为空")
    private BigDecimal balance;

    @ApiModelProperty(value = "使用限制")
    private String restriction;

    @ApiModelProperty(value = "状态")
    private Byte status;

    @ApiModelProperty(value = "有效期", required = true)
    @NotNull(message = "有效期不能为空")
    private LocalDateTime expireTime;

    @ApiModelProperty(value = "发卡（激活）时间")
    private LocalDateTime activatedAt;

    @ApiModelProperty(value = "卡号")
    private String cardNumber;

}
